﻿using System.Collections.Generic;
using System.Linq;
using TrafficWatcher.Models.DirectionsProvider;

namespace TrafficWatcher.Models
{
    public class DirectionsProviderRepository
    {
        private readonly IList<IDirectionsProvider> providers = new List<IDirectionsProvider>();

        public void AddDirectionsProvider(IDirectionsProvider provider)
        {
            if (!providers.Contains(provider))
            {
                providers.Add(provider);
            }
        }

        public List<IDirectionsProvider> DirectionsProviders
        {
            get { return providers.ToList(); }
        }
    }
}
